# -*- coding: utf-8 -*-
'''
@time: 2019/2/13 11:02
@author: hyq
@software: PyCharm
@file: Test_me.py
'''

from PO.MePage import MyPage
import unittest
from appium import webdriver


class TestMePage(unittest.TestCase):
    """测试我的主页"""

    def setUp(self):
        capabilities = {
            'platformName': 'Android',
            'platformVersion': '4.4.2',
            'deviceName': '127.0.0.1:62001',
            'appPackage': 'com.guokr.mentor',
            'appActivity': '.ui.activity.MainActivity',
            'unicodeKeyboard': True,
            'resetKeyboard': True,
            'noReset': True
        }
        self.driver = webdriver.Remote("http://localhost:4723/wd/hub", capabilities)
        self.mypage = MyPage(self.driver)

    def tearDown(self):
        self.driver.quit()

    def test07(self):
        """页面跳转无误"""
        self.mypage.choose()
        self.assertEqual(self.mypage.title(),'我')

    def test08(self):
        """登录"""

